Skip to content

feat: allow RUNLOOP_BASE_URL to include a port override#240

Merged
adam-rl merged 1 commit into
mainfrom
feat/base-url-port-override
Jun 4, 2026
Merged

feat: allow RUNLOOP_BASE_URL to include a port override#240
adam-rl merged 1 commit into
mainfrom
feat/base-url-port-override

Conversation

@adam-rl
Copy link
Copy Markdown
Contributor

@adam-rl adam-rl commented Jun 4, 2026

Summary

Relax RUNLOOP_BASE_URL validation so an optional :port may be supplied (e.g. https://api.runloop.pro:8443), enabling non-standard-port deployments and local testing.

Changes

  • src/utils/config.tscheckBaseDomain() no longer rejects a port. It still requires the https://api.<domain> shape and still rejects path, query, and fragment. The port flows through to all API calls via baseUrl() (which returns the raw env value). Derived platform/SSH/tunnel hostnames are unaffected since runloopBaseDomain() uses URL.hostname, which excludes the port.
  • README.md — documents the optional :port.
  • tests/__tests__/utils/baseUrl.test.ts (new) — covers port acceptance, continued rejection of path/query/non-https, that baseUrl() includes the port, and that runloopBaseDomain() strips both the api. prefix and the port.

Notes

https is still required, so local http:// overrides remain rejected. Happy to relax that too if local dev needs it.

Verification

  • pnpm run build (tsc) passes
  • eslint + prettier clean on changed files
  • 7/7 new tests pass

🤖 Generated with Claude Code

Relax the RUNLOOP_BASE_URL validation so a `:port` may be supplied
(e.g. https://api.runloop.pro:8443). The port flows through to all API
calls via baseUrl(); derived platform/SSH/tunnel hostnames are
unaffected since they use URL.hostname (port-stripped). Path, query,
fragment, and non-https URLs are still rejected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@adam-rl adam-rl requested a review from dines-rl June 4, 2026 20:02
@adam-rl adam-rl merged commit eaef9eb into main Jun 4, 2026
16 checks passed
@adam-rl adam-rl deleted the feat/base-url-port-override branch June 4, 2026 20:05
adam-rl pushed a commit that referenced this pull request Jun 4, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.18.0](v1.17.0...v1.18.0)
(2026-06-04)


### Features

* allow RUNLOOP_BASE_URL to include a port override
([#240](#240))
([eaef9eb](eaef9eb))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants